﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TRTCMain.Controls
{
    public partial class VolumeControl : UserControl
    {
        public delegate void UserNameClickedHandler(string userid);
        public event UserNameClickedHandler UserNameClicked;
        private string UserId = string.Empty;

        public VolumeControl()
        {
            InitializeComponent();
        }

        public void SetUserName(string name, string userId) {
            labelName.Text = name;
            UserId = userId;
        }

        private void labelName_Click(object sender, EventArgs e)
        {
            UserNameClicked?.Invoke(UserId);
        }
    }
}
